package com.example.studyktdemo.uitls;

import android.view.textclassifier.TextLinks;

import java.io.IOException;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public class OkhttpUtils {

    public void TestGet(){
        String url = "https://api.douban.com/v2/movie/top250?start=0&count=10";
        OkHttpClient client = new OkHttpClient();
        Request quest = new Request.Builder().url(url).build();
        Call call = client.newCall(quest);
        call.enqueue(new Callback() {
            @Override
            public void onFailure(Call call, IOException e) {

            }

            @Override
            public void onResponse(Call call, Response response) throws IOException {

            }
        });
    }
}
